<?php

namespace app\modules\frontend\controllers;

use Yii;
use yii\web\Controller;
use app\models\ProductAuth;
use yii\web\Pjax;
use app\models\TraceSystemContent;

class SystemController extends Controller{
     //根据溯源体系的ID将项目体系的记录找到

     public function actionIndex($id,$id2)
     {
         $this->layout = 'product';

         $sql = "select * from shbb_trace_system_content where trace_type_id=$id and item_type_id=1"; //从项目类型表中查找属于该体系id的并且项目指标处于产品指标阶段的数据

         $models = TraceSystemContent::findBySql($sql)->all();


         return $this->renderAjax('index',['system_model'=>$models,'id2'=>$id2]);
     }


}